<template>
	<view>
		<view class="mt-5" v-if="u_loadmore">
			<u-loadmore status="loading" icon-type="circle" />
		</view>
		<view v-else>
			<view class="" v-if="return_id==0">
				<view class="m-2 p-3 bg-white rounded-20 d-flex" v-for="(item,index) in recordList" :key="index">
					<view class="mr-1">{{index+1}}.</view>
					<view>{{recordList.consignee}}于{{item.action_time}}处理订单状态为:{{recordList.label_order_status}};操作备注:{{item.log_description}}</view>
				</view>
			</view>
			<view class="" v-else>
				<view class="my-2 bg-white pl-3">
					<view class="d-flex" v-for="(item,index) in recordList.return_log" :key="index">
						<view class="py-2">{{index+1}}.</view>
						<view class="py-2 ml-3 border-bottom flex-1">
							<view class="">{{item.formatted_action_time}}</view>
							<view class="mt-1">{{item.log_description}}</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				order_id:0, // 订单ID
				return_id:0, // 售后ID
				recordList:"", // 备注列表 
				u_loadmore:true, // 加载中
			}
		},
		methods: {
			
		},
		onLoad(e) {
			this.order_id=e.order_id
			this.return_id=e.return_id
			if(e.return_id){
				this.$H.post("admin/order/return/detail",{return_id:e.return_id}).then(res=>{
					this.recordList=res.data
					this.u_loadmore=false 
				})
			}else{
				this.$H.post("admin/orders/detail",{id:e.order_id}).then(res=>{
					this.recordList=res.data
					this.u_loadmore=false 
				})
			}
		}
	}
</script>

<style>

</style>
